Skip to content

Commit da6b2c1

Browse files
committed
Fix #1164 crash on hwaccel and avformat-novalidate
regression in 2999a10
1 parent 2999a10 commit da6b2c1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/modules/avformat/producer_avformat.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,9 +1024,6 @@ static int setup_filters(producer_avformat self)
10241024
}
10251025
}
10261026

1027-
if (self->hwaccel.device_type != AV_HWDEVICE_TYPE_NONE)
1028-
return -1;
1029-
10301027
if (!self->vfilter_graph && (self->autorotate || filtergraph) && self->video_index != -1) {
10311028
AVFilterContext *last_filter = NULL;
10321029
if (self->autorotate) {
@@ -1261,7 +1258,7 @@ static int producer_open(
12611258
if (self->audio_format && !self->audio_streams)
12621259
get_audio_streams_info(self);
12631260

1264-
if (!test_open) {
1261+
if (!test_open && (self->hwaccel.device_type == AV_HWDEVICE_TYPE_NONE)) {
12651262
error = setup_filters(self);
12661263
}
12671264
}

0 commit comments

Comments
 (0)