diff --git a/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c b/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c index 07db89969d..dc1861e771 100644 --- a/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c +++ b/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c @@ -1790,6 +1790,10 @@ gst_video_flip_sink_event (GstBaseTransform * trans, GstEvent * event) gst_video_flip_set_method (vf, method, TRUE); } break; + case GST_EVENT_STREAM_START: + GST_DEBUG_OBJECT (vf, "new stream, reset orientation from tags"); + gst_video_flip_set_method (vf, GST_VIDEO_ORIENTATION_IDENTITY, TRUE); + break; default: break; } diff --git a/subprojects/gst-plugins-good/tests/check/elements/videoflip.c b/subprojects/gst-plugins-good/tests/check/elements/videoflip.c index dfa107021e..7e1b857acf 100644 --- a/subprojects/gst-plugins-good/tests/check/elements/videoflip.c +++ b/subprojects/gst-plugins-good/tests/check/elements/videoflip.c @@ -369,6 +369,15 @@ GST_START_TEST (test_orientation_tag) // caps is updated as the frame is now rotated caps_update (flip, &in_info, TRUE); + // orientation is reset on STREAM_START + gst_harness_push_event (flip, gst_event_new_stream_start ("2")); + + e = gst_harness_pull_event (flip); + fail_unless_equals_int (GST_EVENT_TYPE (e), GST_EVENT_STREAM_START); + gst_event_unref (e); + + caps_update (flip, &in_info, FALSE); + gst_harness_teardown (flip); }