diff mbox

[FFmpeg-devel,5/5] mpeg: fix use of deprecated struct

Message ID 20171222143512.92271-6-misty@brew.sh
State Superseded
Headers show

Commit Message

misty@brew.sh Dec. 22, 2017, 2:35 p.m. UTC
From: Misty De Meo <mistydemeo@gmail.com>

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

Comments

James Almer Jan. 5, 2018, 2:47 p.m. UTC | #1
On 12/22/2017 11:35 AM, misty@brew.sh wrote:
> From: Misty De Meo <mistydemeo@gmail.com>
> 
> ---
>  libavformat/mpeg.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
> index a366ece0ed..210424faf3 100644
> --- a/libavformat/mpeg.c
> +++ b/libavformat/mpeg.c
> @@ -547,8 +547,8 @@ redo:
>          len--;
>          for (i = 0; i < s->nb_streams; i++) {
>              st = s->streams[i];
> -            if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
> -                st->codec->codec_id == AV_CODEC_ID_ATRAC3P &&
> +            if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
> +                st->codecpar->codec_id == AV_CODEC_ID_ATRAC3P &&
>                  st->id - 0x1BD0 == (startcode & 0xF))
>                  goto found;
>          }

This needs to be squashed into the previous patch.
diff mbox

Patch

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index a366ece0ed..210424faf3 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -547,8 +547,8 @@  redo:
         len--;
         for (i = 0; i < s->nb_streams; i++) {
             st = s->streams[i];
-            if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
-                st->codec->codec_id == AV_CODEC_ID_ATRAC3P &&
+            if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
+                st->codecpar->codec_id == AV_CODEC_ID_ATRAC3P &&
                 st->id - 0x1BD0 == (startcode & 0xF))
                 goto found;
         }