[FFmpeg-cvslog] avformat/mpegtsenc: fix usage of AVStream.codec

James Almer git at videolan.org
Wed May 4 23:40:26 CEST 2016


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed May  4 18:39:27 2016 -0300| [fe483ac4285408f669886df304da8d714001bb1b] | committer: James Almer

avformat/mpegtsenc: fix usage of AVStream.codec

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe483ac4285408f669886df304da8d714001bb1b
---

 libavformat/mpegtsenc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index f33351f..8be24fa 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -319,8 +319,8 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
             break;
         case AV_CODEC_ID_MP2:
         case AV_CODEC_ID_MP3:
-            if (   st->codec->sample_rate > 0
-                && st->codec->sample_rate < 32000) {
+            if (   st->codecpar->sample_rate > 0
+                && st->codecpar->sample_rate < 32000) {
                 stream_type = STREAM_TYPE_AUDIO_MPEG2;
             } else {
                 stream_type = STREAM_TYPE_AUDIO_MPEG1;



More information about the ffmpeg-cvslog mailing list