Commit 7db7eb08 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
  avconv: move audio_channels to the options context.
  avconv: move *_disable to options context.
  avconv: remove -[vas]lang options.
  avconv: move codec tags to options context.
  cljr: init_get_bits size in bits instead of bytes
  indeo2: fail if input buffer too small
  indeo2: init_get_bits size in bits instead of bytes
  ffv1: Fixed size given to init_get_bits() in decoder.

Conflicts:
	avconv.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 60599c68 8bfea4ab
This diff is collapsed.
...@@ -202,9 +202,6 @@ avconv -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg ...@@ -202,9 +202,6 @@ avconv -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
@item -dframes @var{number} @item -dframes @var{number}
Set the number of data frames to record. This is an alias for @code{-frames:d}. Set the number of data frames to record. This is an alias for @code{-frames:d}.
@item -slang @var{code}
Set the ISO 639 language code (3 letters) of the current subtitle stream.
@item -frames[:stream_specifier] @var{framecount} @item -frames[:stream_specifier] @var{framecount}
Stop writing to the stream after @var{framecount} frames. Stop writing to the stream after @var{framecount} frames.
...@@ -337,9 +334,6 @@ prefix is ``av2pass''. The complete file name will be ...@@ -337,9 +334,6 @@ prefix is ``av2pass''. The complete file name will be
@file{PREFIX-N.log}, where N is a number specific to the output @file{PREFIX-N.log}, where N is a number specific to the output
stream. stream.
@item -vlang @var{code}
Set the ISO 639 language code (3 letters) of the current video stream.
@item -vf @var{filter_graph} @item -vf @var{filter_graph}
@var{filter_graph} is a description of the filter graph to apply to @var{filter_graph} is a description of the filter graph to apply to
the input video. the input video.
...@@ -564,7 +558,7 @@ top=1/bottom=0/auto=-1 field first ...@@ -564,7 +558,7 @@ top=1/bottom=0/auto=-1 field first
@item -dc @var{precision} @item -dc @var{precision}
Intra_dc_precision. Intra_dc_precision.
@item -vtag @var{fourcc/tag} @item -vtag @var{fourcc/tag}
Force video tag/fourcc. Force video tag/fourcc. This is an alias for @code{-tag:v}.
@item -qphist @item -qphist
Show QP histogram. Show QP histogram.
@item -force_key_frames @var{time}[,@var{time}...] @item -force_key_frames @var{time}[,@var{time}...]
...@@ -596,15 +590,13 @@ and is mapped to the corresponding demuxer options. ...@@ -596,15 +590,13 @@ and is mapped to the corresponding demuxer options.
Disable audio recording. Disable audio recording.
@item -acodec @var{codec} @item -acodec @var{codec}
Set the audio codec. This is an alias for @code{-codec:a}. Set the audio codec. This is an alias for @code{-codec:a}.
@item -alang @var{code}
Set the ISO 639 language code (3 letters) of the current audio stream.
@end table @end table
@section Advanced Audio options: @section Advanced Audio options:
@table @option @table @option
@item -atag @var{fourcc/tag} @item -atag @var{fourcc/tag}
Force audio tag/fourcc. Force audio tag/fourcc. This is an alias for @code{-tag:a}.
@item -audio_service_type @var{type} @item -audio_service_type @var{type}
Set the type of service that the audio stream contains. Set the type of service that the audio stream contains.
@table @option @table @option
...@@ -634,8 +626,6 @@ Karaoke ...@@ -634,8 +626,6 @@ Karaoke
@table @option @table @option
@item -scodec @var{codec} @item -scodec @var{codec}
Set the subtitle codec. This is an alias for @code{-codec:s}. Set the subtitle codec. This is an alias for @code{-codec:s}.
@item -slang @var{code}
Set the ISO 639 language code (3 letters) of the current subtitle stream.
@item -sn @item -sn
Disable subtitle recording. Disable subtitle recording.
@end table @end table
...@@ -811,6 +801,9 @@ avconv -i h264.mp4 -c:v copy -vbsf h264_mp4toannexb -an out.h264 ...@@ -811,6 +801,9 @@ avconv -i h264.mp4 -c:v copy -vbsf h264_mp4toannexb -an out.h264
@example @example
avconv -i file.mov -an -vn -sbsf mov2textsub -c:s copy -f rawvideo sub.txt avconv -i file.mov -an -vn -sbsf mov2textsub -c:s copy -f rawvideo sub.txt
@end example @end example
@item -tag[:@var{stream_specifier}] @var{codec_tag}
Force a tag/fourcc for matching streams.
@end table @end table
@c man end OPTIONS @c man end OPTIONS
......
This diff is collapsed.
...@@ -67,7 +67,7 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -67,7 +67,7 @@ static int decode_frame(AVCodecContext *avctx,
p->pict_type= AV_PICTURE_TYPE_I; p->pict_type= AV_PICTURE_TYPE_I;
p->key_frame= 1; p->key_frame= 1;
init_get_bits(&a->gb, buf, buf_size); init_get_bits(&a->gb, buf, buf_size * 8);
for(y=0; y<avctx->height; y++){ for(y=0; y<avctx->height; y++){
uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ]; uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ];
......
...@@ -153,6 +153,13 @@ static int ir2_decode_frame(AVCodecContext *avctx, ...@@ -153,6 +153,13 @@ static int ir2_decode_frame(AVCodecContext *avctx,
return -1; return -1;
} }
start = 48; /* hardcoded for now */
if (start >= buf_size) {
av_log(s->avctx, AV_LOG_ERROR, "input buffer size too small (%d)\n", buf_size);
return AVERROR_INVALIDDATA;
}
s->decode_delta = buf[18]; s->decode_delta = buf[18];
/* decide whether frame uses deltas or not */ /* decide whether frame uses deltas or not */
...@@ -160,9 +167,8 @@ static int ir2_decode_frame(AVCodecContext *avctx, ...@@ -160,9 +167,8 @@ static int ir2_decode_frame(AVCodecContext *avctx,
for (i = 0; i < buf_size; i++) for (i = 0; i < buf_size; i++)
buf[i] = av_reverse[buf[i]]; buf[i] = av_reverse[buf[i]];
#endif #endif
start = 48; /* hardcoded for now */
init_get_bits(&s->gb, buf + start, buf_size - start); init_get_bits(&s->gb, buf + start, (buf_size - start) * 8);
if (s->decode_delta) { /* intraframe */ if (s->decode_delta) { /* intraframe */
ir2_decode_plane(s, avctx->width, avctx->height, ir2_decode_plane(s, avctx->width, avctx->height,
......
...@@ -863,12 +863,13 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, ...@@ -863,12 +863,13 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
} }
switch(id & WP_IDF_MASK){ switch(id & WP_IDF_MASK){
case WP_ID_DECTERMS: case WP_ID_DECTERMS:
s->terms = size; if(size > MAX_TERMS){
if(s->terms > MAX_TERMS){
av_log(avctx, AV_LOG_ERROR, "Too many decorrelation terms\n"); av_log(avctx, AV_LOG_ERROR, "Too many decorrelation terms\n");
s->terms = 0;
buf += ssize; buf += ssize;
continue; continue;
} }
s->terms = size;
for(i = 0; i < s->terms; i++) { for(i = 0; i < s->terms; i++) {
s->decorr[s->terms - i - 1].value = (*buf & 0x1F) - 5; s->decorr[s->terms - i - 1].value = (*buf & 0x1F) - 5;
s->decorr[s->terms - i - 1].delta = *buf >> 5; s->decorr[s->terms - i - 1].delta = *buf >> 5;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment