[FFmpeg-devel] [PATCH] avformat/oggparseopus: Check opus_duration() return value

James Almer jamrial at gmail.com
Thu Dec 12 07:44:10 CET 2013


On 12/12/13 3:34 AM, James Almer wrote:
> Regression since 39d11d599cd292485fe991cd22e10d7a1738b3bc
> 
> os->pduration would be wrongly assigned a negative value on invalid packets
> instead of aborting.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/oggparseopus.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

This makes it behave the same as it was before 39d11d5, but i noticed the one 
commit after it added a code path that instead adds the AV_PKT_FLAG_CORRUPT to 
the packet and returns 0 rather than AVERROR_INVALIDDATA.

Not sure if that should also be done here, but it would be consistent with how 
vorbis is handled if so.

Regards.


More information about the ffmpeg-devel mailing list