Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dv1394: Swap the min and max values of the 'standard' option
  rtpdec_vp8: Don't parse fields that aren't used
  lavc: add some AVPacket doxy.
  audiointerleave: deobfuscate a function call.
  rtpdec: factorize identical code used in several handlers
  a64: remove interleaved mode.
  doc: Point to the new location of the c99-to-c89 tool
  decode_audio3: initialize AVFrame
  ws-snd1: set channel layout
  wmavoice: set channel layout
  wmapro: use AVCodecContext.channels instead of keeping a private copy
  wma: do not keep private copies of some AVCodecContext fields

Conflicts:
	libavcodec/wmadec.c
	libavcodec/wmaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2012-11-02 14:40:04 +01:00
18 changed files with 150 additions and 268 deletions

View File

@@ -20,6 +20,7 @@
*/
#include "avformat.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/mjpeg.h"
@@ -367,19 +368,11 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
avio_write(jpeg->frame, buf, sizeof(buf));
/* Prepare the JPEG packet. */
av_init_packet(pkt);
pkt->size = avio_close_dyn_buf(jpeg->frame, &pkt->data);
if (pkt->size < 0) {
if ((ret = ff_rtp_finalize_packet(pkt, &jpeg->frame, st->index)) < 0) {
av_log(ctx, AV_LOG_ERROR,
"Error occured when getting frame buffer.\n");
jpeg->frame = NULL;
return pkt->size;
return ret;
}
pkt->stream_index = st->index;
pkt->destruct = av_destruct_packet;
/* Re-init the frame buffer. */
jpeg->frame = NULL;
return 0;
}