mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-03 11:07:41 +00:00
mtvdemuxer: fix segfault caused by truncated packets.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ee181f84a3
commit
f890cb948c
@ -196,7 +196,7 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
* just swap bytes as they come
|
||||
*/
|
||||
|
||||
for(i=0;i<mtv->img_segment_size/2;i++)
|
||||
for(i=0;i<ret/2;i++)
|
||||
*((uint16_t *)pkt->data+i) = av_bswap16(*((uint16_t *)pkt->data+i));
|
||||
#endif
|
||||
pkt->stream_index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user