mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-26 00:31:12 +00:00
h264: do not return on sidedata allocation failure
Not having allocated it is not a good reason to leave the object in an undetermined state. Though a particular setting like the AV_EF_* flags could be useful to control that behaviour. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
aaaf7261b7
commit
585047bb7d
@ -835,9 +835,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
|
|||||||
h->content_interpretation_type > 0 &&
|
h->content_interpretation_type > 0 &&
|
||||||
h->content_interpretation_type < 3) {
|
h->content_interpretation_type < 3) {
|
||||||
AVStereo3D *stereo = av_stereo3d_create_side_data(&cur->f);
|
AVStereo3D *stereo = av_stereo3d_create_side_data(&cur->f);
|
||||||
if (!stereo)
|
if (stereo) {
|
||||||
return;
|
|
||||||
|
|
||||||
switch (h->frame_packing_arrangement_type) {
|
switch (h->frame_packing_arrangement_type) {
|
||||||
case 0:
|
case 0:
|
||||||
stereo->type = AV_STEREO3D_CHECKERBOARD;
|
stereo->type = AV_STEREO3D_CHECKERBOARD;
|
||||||
@ -867,6 +865,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
|
|||||||
|
|
||||||
if (h->content_interpretation_type == 2)
|
if (h->content_interpretation_type == 2)
|
||||||
stereo->flags = AV_STEREO3D_FLAG_INVERT;
|
stereo->flags = AV_STEREO3D_FLAG_INVERT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h->sei_display_orientation_present &&
|
if (h->sei_display_orientation_present &&
|
||||||
@ -875,12 +874,11 @@ static void decode_postinit(H264Context *h, int setup_finished)
|
|||||||
AVFrameSideData *rotation = av_frame_new_side_data(&cur->f,
|
AVFrameSideData *rotation = av_frame_new_side_data(&cur->f,
|
||||||
AV_FRAME_DATA_DISPLAYMATRIX,
|
AV_FRAME_DATA_DISPLAYMATRIX,
|
||||||
sizeof(int32_t) * 9);
|
sizeof(int32_t) * 9);
|
||||||
if (!rotation)
|
if (rotation) {
|
||||||
return;
|
av_display_rotation_set((int32_t *)rotation->data, angle);
|
||||||
|
av_display_matrix_flip((int32_t *)rotation->data,
|
||||||
av_display_rotation_set((int32_t *)rotation->data, angle);
|
h->sei_vflip, h->sei_hflip);
|
||||||
av_display_matrix_flip((int32_t *)rotation->data,
|
}
|
||||||
h->sei_vflip, h->sei_hflip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cur->mmco_reset = h->mmco_reset;
|
cur->mmco_reset = h->mmco_reset;
|
||||||
|
Loading…
Reference in New Issue
Block a user