1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

14 Commits

Author SHA1 Message Date
Michael Niedermayer
2bd9956454 doc/examples/demuxing_decoding: Drop AVFrame->pts use
This code is not correct for git master

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-18 15:15:12 +02:00
James Almer
bba6a03b28 examples/demuxing_decoding: convert to codecpar
Signed-off-by: James Almer <jamrial@gmail.com>
2016-08-17 19:17:04 -03:00
Hendrik Leppkes
c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Clément Bœsch
d9464e9c14 doc/examples/demuxing_decoding: simplify api_mode to refcount
This finalizes the quick cleanup of a753e6c9f5.
2015-09-06 12:35:00 +02:00
Michael Niedermayer
a753e6c9f5 doc/examples/demuxing_decoding: Drop old api mode, because the code fails to build otherwise
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-05 18:25:24 +02:00
Andreas Cadhalpun
dd6c8575db examples/demuxing_decoding: use properties from frame instead of video_dec_ctx
This is more robust.

And only check if there is actually a frame returned.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-15 18:32:18 +02:00
Andreas Cadhalpun
078be09dd7 examples/demuxing_decoding: abort decoding when width, height or pix_fmt change
This is necessary, because avcodec_decode_video2 can change
width, height and/or pixel format of the AVCodecContext. Since
video_dst_data and video_dst_linesize are not updated by calling
av_image_alloc again, av_image_copy[_plane] asserts, because the
destination buffer is too small.

In this case, creating a useable rawvideo is not possible anyway, since
it has fixed width/height/pix_fmt.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-10 02:43:47 +01:00
Andreas Cadhalpun
2a3b7a55b5 examples/demuxing_decoding: set stream_idx in open_codec_context only if no error occured
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-31 21:54:36 +01:00
compn
84bccae8e9 doc: fix typo 2014-03-07 17:07:37 -05:00
Michael Niedermayer
341639fe80 doc/examples: remove pathes from doxy examples
This makes the examples page less cluttered

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-17 13:50:53 +01:00
Clément Bœsch
b02d87936b examples/demuxing_decoding: print the decoding error when it happens. 2013-12-13 10:37:20 +01:00
Even Wiik Thomassen
43f116d162 examples/demuxing_decoding: return error when no codec found
The open_codec_context function, when it fails to find a codec, now
return AVERROR(EINVAL) to signal an error.

Before it would return the stream index, which was always >= 0, and
continue as if a codec was found. This change make it fail faster,
instead of repeated failed tries to decode frames with no codec.

Signed-off-by: Even Wiik Thomassen <e.thomassen@sportradar.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-12-13 09:45:54 +01:00
Stefano Sabatini
50a28b1393 doc/examples: do not check NULL values for avcodec_close()
avcodec_close() does nothing in case the argument is NULL. Simplify.
2013-11-21 23:29:56 +01:00
Clément Bœsch
fb10b43fc4 doc/examples: rename demuxing to demuxing_decoding.
That example shows how the decoding process works, not only the
demuxing.
2013-11-04 12:53:06 +01:00