summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-05 02:03:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-05 02:03:12 +0100
commit7f83db312454b3673a4dfd34745428f61309ab30 (patch)
tree27c92b052b83e4b3bf95a33fbe6979aaa00f8184 /libavcodec/h264.c
parentc4eec85a1fa768025f88261995af08f1dba9685d (diff)
parentfeb15cee5e19a1e31d075ec08d598d64c2dc38ef (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: (46 commits) mtv: Make sure audio_subsegments is not 0 v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined avconv: add symbolic names for -vsync parameters flvdec: Fix compiler warning for uninitialized variables rtsp: Fix compiler warning for uninitialized variable ulti: convert to new bytestream API. swscale: Use standard multiple inclusion guards in ppc/ header files. Place some START_TIMER invocations in separate blocks. v4l2: list available formats v4l2: set the proper codec_tag v4l2: refactor device_open v4l2: simplify away io_method v4l2: cosmetics v4l2: uniform and format options v4l2: do not force interlaced mode avio: exit early in fill_buffer without read_packet vc1dec: fix invalid memory access for small video dimensions rv34: fix invalid memory access for small video dimensions rv34: joint coefficient decoding and dequantization avplay: Don't call avio_set_interrupt_cb(NULL) ... Conflicts: Changelog avconv.c doc/APIchanges doc/indevs.texi libavcodec/adxenc.c libavcodec/dnxhdenc.c libavcodec/h264.c libavdevice/v4l2.c libavformat/flvdec.c libavformat/mtv.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8a79311f7c..8cd9fe72ef 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4051,7 +4051,7 @@ static int decode_frame(AVCodecContext *avctx,
H264Context *h = avctx->priv_data;
MpegEncContext *s = &h->s;
AVFrame *pict = data;
- int buf_index;
+ int buf_index = 0;
Picture *out;
int i, out_idx;
@@ -4081,7 +4081,7 @@ static int decode_frame(AVCodecContext *avctx,
*pict= *(AVFrame*)out;
}
- return buf_size;
+ return buf_index;
}
if(h->is_avc && buf_size >= 9 && buf[0]==1 && buf[2]==0 && (buf[4]&0xFC)==0xFC && (buf[5]&0x1F) && buf[8]==0x67){
int cnt= buf[5]&0x1f;
@@ -4112,7 +4112,6 @@ not_extra:
if (!s->current_picture_ptr && h->nal_unit_type == NAL_END_SEQUENCE) {
av_assert0(buf_index <= buf_size);
- buf_size = buf_index;
goto out;
}
@@ -4193,9 +4192,7 @@ int main(void){
init_get_bits(&gb, temp, 8*SIZE);
for(i=0; i<COUNT; i++){
- int j, s;
-
- s= show_bits(&gb, 24);
+ int j, s = show_bits(&gb, 24);
{START_TIMER
j= get_ue_golomb(&gb);
@@ -4218,9 +4215,7 @@ int main(void){
init_get_bits(&gb, temp, 8*SIZE);
for(i=0; i<COUNT; i++){
- int j, s;
-
- s= show_bits(&gb, 24);
+ int j, s = show_bits(&gb, 24);
{START_TIMER
j= get_se_golomb(&gb);