History

avcodec/mpeg12dec: Reinit upon chroma_format change

Andreas Rheinhardt committed 1 year ago

Commit 53a01211 parent 1f0af6b1 file · +3 −1Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/mpeg12dec.c+3−1
@@ -80,7 +80,7 @@ typedef struct Mpeg1Context { · 79 unmodified lines
80 int has_afd;80 int has_afd;
81 int slice_count;81 int slice_count;
82 unsigned aspect_ratio_info;82 unsigned aspect_ratio_info;
83 int save_width, save_height, save_progressive_seq;83 int save_width, save_height, save_progressive_seq, save_chroma_format;
84 AVRational frame_rate_ext; /* MPEG-2 specific framerate modificator */84 AVRational frame_rate_ext; /* MPEG-2 specific framerate modificator */
85 unsigned frame_rate_index;85 unsigned frame_rate_index;
86 int sync; /* Did we reach a sync point like a GOP/SEQ/KEYFrame? */86 int sync; /* Did we reach a sync point like a GOP/SEQ/KEYFrame? */
@@ -917,6 +917,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) · 830 unmodified lines
917 avctx->coded_height != s->height ||917 avctx->coded_height != s->height ||
918 s1->save_width != s->width ||918 s1->save_width != s->width ||
919 s1->save_height != s->height ||919 s1->save_height != s->height ||
920 s1->save_chroma_format != s->chroma_format ||
920 (s1->save_progressive_seq != s->progressive_sequence && FFALIGN(s->height, 16) != FFALIGN(s->height, 32)) ||921 (s1->save_progressive_seq != s->progressive_sequence && FFALIGN(s->height, 16) != FFALIGN(s->height, 32)) ||
921 0) {922 0) {
922 if (s->context_initialized)923 if (s->context_initialized)
@@ -936,6 +937,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) · 13 unmodified lines
936 s1->save_width = s->width;937 s1->save_width = s->width;
937 s1->save_height = s->height;938 s1->save_height = s->height;
938 s1->save_progressive_seq = s->progressive_sequence;939 s1->save_progressive_seq = s->progressive_sequence;
940 s1->save_chroma_format = s->chroma_format;
939 941
940 /* low_delay may be forced, in this case we will have B-frames942 /* low_delay may be forced, in this case we will have B-frames
941 * that behave like P-frames. */943 * that behave like P-frames. */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t