-
-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen displays upside down #972
Comments
What if you rotate to landscape? Is it upside down in landscape? If you record using
? |
Hi, @rom1v the view remains upside down even when rotated to landscape. However, the recorded screen in |
One possible cause could be that the frame are encoded with some rotation metadata (which would surprise me, since it's just raw H.264). Could you apply this patch, recompile and retry, and tell me what it prints in the console, please? diff --git a/app/src/decoder.c b/app/src/decoder.c
index cad1991..f718e55 100644
--- a/app/src/decoder.c
+++ b/app/src/decoder.c
@@ -1,6 +1,7 @@
#include "decoder.h"
#include <libavformat/avformat.h>
+#include <libavutil/display.h>
#include <libavutil/time.h>
#include <SDL2/SDL_assert.h>
#include <SDL2/SDL_events.h>
@@ -75,6 +76,14 @@ decoder_push(struct decoder *decoder, const AVPacket *packet) {
decoder->video_buffer->decoding_frame);
if (!ret) {
// a frame was received
+ AVFrame *frame = decoder->video_buffer->decoding_frame;
+ LOGI("new frame");
+ for (int i = 0; i < frame->nb_side_data; ++i) {
+ AVFrameSideData *sd = frame->side_data[i];
+ if (sd->type == AV_FRAME_DATA_DISPLAYMATRIX) {
+ LOGI("rotation: %.2f", av_display_rotation_get((int32_t *) sd->data));
+ }
+ }
push_frame(decoder);
} else if (ret != AVERROR(EAGAIN)) {
LOGE("Could not receive video frame: %d", ret); |
Hi @rom1v, I have applied the patch but the problem persists. This is the console output: INFO: Initial texture: 720x1280
INFO: new frame
INFO: new frame
INFO: new frame ⋮ |
On
|
Issue
My screen display upside down, I have tried changing device orientation, flipping it upside down and locking up the orientation but the problem persists.
Device Details
Device: TECNO-C7
Android Version: 6.0
HiOS Version: Camon 1.1.0
Screenshot
The text was updated successfully, but these errors were encountered: