diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-07 14:38:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-07 15:02:31 +0100 |
commit | 2303b45112b4c9097a661998f3d9ebe81eea2cac (patch) | |
tree | e90f1d4e35c0353417e04c19099135b247dfa8da /libavformat | |
parent | 8ca9a68f1905ff871690be38348d62a25aef2a8f (diff) | |
download | ffmpeg-2303b45112b4c9097a661998f3d9ebe81eea2cac.tar.gz |
avformat/segafilm: drop song and dance, this seems not to do anything anymore since a long time
Fixes use of uninitialized memory
Partly fixes; msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/segafilm.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index c7c77fc1ff..6b3ad52446 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -266,18 +266,10 @@ static int film_read_packet(AVFormatContext *s, /* position the stream (will probably be there anyway) */ avio_seek(pb, sample->sample_offset, SEEK_SET); - /* do a special song and dance when loading FILM Cinepak chunks */ - if ((sample->stream == film->video_stream_index) && - (film->video_type == AV_CODEC_ID_CINEPAK)) { - pkt->pos= avio_tell(pb); - if (av_new_packet(pkt, sample->sample_size)) - return AVERROR(ENOMEM); - avio_read(pb, pkt->data, sample->sample_size); - } else { - ret= av_get_packet(pb, pkt, sample->sample_size); - if (ret != sample->sample_size) - ret = AVERROR(EIO); - } + + ret= av_get_packet(pb, pkt, sample->sample_size); + if (ret != sample->sample_size) + ret = AVERROR(EIO); pkt->stream_index = sample->stream; pkt->pts = sample->pts; |