Message ID | 20200904110354.10100-2-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | ef91d18a04e0fdf4ca989b34e8fb5d0ea923b5f5 |
Headers | show |
Series | [FFmpeg-devel,1/2] avformat/yuv4mpegenc: Simplify writing global and packet headers | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On 9/4/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote: > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavformat/yuv4mpegenc.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > lgtm > diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c > index fdd020e13b..6b53780ba0 100644 > --- a/libavformat/yuv4mpegenc.c > +++ b/libavformat/yuv4mpegenc.c > @@ -184,12 +184,10 @@ static int yuv4_write_packet(AVFormatContext *s, > AVPacket *pkt) > { > AVStream *st = s->streams[pkt->stream_index]; > AVIOContext *pb = s->pb; > - AVFrame *frame; > + const AVFrame *frame = (const AVFrame *)pkt->data; > int width, height, h_chroma_shift, v_chroma_shift; > int i; > - uint8_t *ptr, *ptr1, *ptr2; > - > - frame = (AVFrame *)pkt->data; > + const uint8_t *ptr, *ptr1, *ptr2; > > /* construct frame header */ > > -- > 2.20.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c index fdd020e13b..6b53780ba0 100644 --- a/libavformat/yuv4mpegenc.c +++ b/libavformat/yuv4mpegenc.c @@ -184,12 +184,10 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) { AVStream *st = s->streams[pkt->stream_index]; AVIOContext *pb = s->pb; - AVFrame *frame; + const AVFrame *frame = (const AVFrame *)pkt->data; int width, height, h_chroma_shift, v_chroma_shift; int i; - uint8_t *ptr, *ptr1, *ptr2; - - frame = (AVFrame *)pkt->data; + const uint8_t *ptr, *ptr1, *ptr2; /* construct frame header */
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/yuv4mpegenc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)