On Tue, Feb 09, 2016 at 12:18:34PM +0100, Anton Khirnov wrote:
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -664,14 +664,15 @@ static int mpegts_write_header(AVFormatContext *s)
>          /* Arbitrary values, PAT/PMT could be written on key frames */
>          ts->sdt_packet_period = 200;
>          ts->pat_packet_period = 40;
> -        if (pcr_st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
> -            if (!pcr_st->codec->frame_size) {
> +        if (pcr_st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
> +            int frame_size = av_get_audio_frame_duration2(pcr_st->codecpar, 
> 0);
> +            if (!frame_size) {
>                  av_log(s, AV_LOG_WARNING, "frame size not set\n");

I trust this is the new way of doing things.

probably OK

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to